//import junit.framework.TestCase;


public class ppTest /*extends TestCase*/ {
	
	
	public void testDefineMiddle0() {
				
		//assertEquals("0,0", 0, PP.defineMiddle(0,0));								
	}
	
	
	public void testDefineMiddle1() {
				
		//assertEquals("7,7", 7, PP.defineMiddle(7,7));
	}
	
	public void testDefineMiddle2() {
				
		//assertEquals("0,7", 4, PP.defineMiddle(0,7));								
	}
	
	
	public void testDefineMiddle3() {
				
		//assertEquals("2,4", 3, PP.defineMiddle(2,4));								
	}
	
	
	public void testDefineMiddle4() {
				
		//assertEquals("0,1", 1, PP.defineMiddle(0,1));					
	}
	
	
	public void testFindValue0() {
				
		int[] sortedArray = new int[] { 3, 5, 13, 35, 56, 112, 120, 136 };
		for (int i = 0; i < sortedArray.length; i++) {
			int result = PP.findValueIndex(sortedArray, sortedArray[i]);
			//assertEquals("Incorrect index:", i, result);		
		}
	}
	
	
	public void testFindValue1() {
		
		int[] sortedArray = new int[] { 3, 5, 13, 35, 56, 112, 120, 136 };		
		int result = PP.findValueIndex(sortedArray, -1);
		//assertEquals("Incorrect index:", -1, result);
		result = PP.findValueIndex(sortedArray, -10);
		//assertEquals("Incorrect index:", -1, result);		
	}
	
	
	public void testFindValue2() {
		
		int[] sortedArray = new int[] { 3, 5, 13, 35, 56, 112, 120, 136 };		
		int result = PP.findValueIndex(sortedArray, 4);
		//assertEquals("Incorrect index:", -1, result);
		result = PP.findValueIndex(sortedArray, 6);
		//assertEquals("Incorrect index:", -1, result);		
	}
	
	
	public void testFindValue3() {
		
		int[] sortedArray = new int[] { 3, 5, 13, 35, 56, 112, 120, 136 };		
		int result = PP.findValueIndex(sortedArray, 55);
		//assertEquals("Incorrect index:", -1, result);
		result = PP.findValueIndex(sortedArray, 57);
		//assertEquals("Incorrect index:", -1, result);		
	}
	
	
	public void testFindValue4() {
		
		int[] sortedArray = new int[] { 3, 5, 13, 35, 56, 112, 120, 136 };		
		int result = PP.findValueIndex(sortedArray, 140);
		//assertEquals("Incorrect index:", -1, result);
		result = PP.findValueIndex(sortedArray, 150);
		//assertEquals("Incorrect index:", -1, result);		
	}
	
		
	
	
	/*public static void testDefineMiddele() {
		
		if (0 != defineMiddle(0,0)) {
			throw new RuntimeException("DefineMiddle works imncorrect!");
		}
		
		if (7 != defineMiddle(7,7)) {
			throw new RuntimeException("DefineMiddle works imncorrect!");
		}
		
		if (4 != defineMiddle(0,7)) {
			throw new RuntimeException("DefineMiddle works imncorrect!");
		}
		
		if (2 != defineMiddle(0,4)) {
			throw new RuntimeException("DefineMiddle works imncorrect!");
		}
		
		if (3 != defineMiddle(2,4)) {
			throw new RuntimeException("DefineMiddle works imncorrect!");
		}
		
		if (1 != defineMiddle(0,1)) {
			throw new RuntimeException("DefineMiddle works incorrectly!");
		}
		
		System.out.println("DefineMiddle operation works correctly!");
		
	}*/

}
